<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-xianxingtime-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">开始时间：</label>
				<div class="col-sm-8">
					<input id="stratTime" name="stratTime" class="form-control" type="text" >
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">结束时间：</label>
				<div class="col-sm-8">
					<input id="endTime" name="endTime" class="form-control" type="text" >
				</div>
			</div>

		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/xianxingtime"
		$("#form-xianxingtime-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-xianxingtime-add').serialize());
	        }
	    }
		$("#stratTime").blur(function(){

			var cc= $("#stratTime").val();

			var _reTimeReg = /^(([0-1]?\d)|(2[0-4])):[0-5]?\d$/;
			if(!_reTimeReg.test(cc)){
				alert("请输入正确的时间格式HH:mm");
				return false;
			}
		});

		$("#endTime").blur(function(){

			var dd= $("#endTime").val();

			var _reTimeReg = /^(([0-1]?\d)|(2[0-4])):[0-5]?\d$/;
			if(!_reTimeReg.test(dd)){
				alert("请输入正确的时间格式HH:mm");
				return false;
			}
		});

	</script>
</body>
</html>
